package by.msokoloff.javaweb2015.datamodel;

import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

@Entity
@Table(name = "registration")
public class Registration extends AbstractEntity {

	@ManyToOne
	private TripOrder tripOrder;

	@Column
	private String firstName;

	@Column
	private String lastName;

	@Column
	private String passport;

	@Column
	private Date birthDate;

	public TripOrder getTripOrder() {
		return tripOrder;
	}

	public void setTripOrder(TripOrder order) {
		this.tripOrder = order;
	}

	public String getFirstName() {
		return firstName;
	}

	public void setFirstName(String firstName) {
		this.firstName = firstName;
	}

	public String getLastName() {
		return lastName;
	}

	public void setLastName(String lastName) {
		this.lastName = lastName;
	}

	public String getPassport() {
		return passport;
	}

	public void setPassport(String passport) {
		this.passport = passport;
	}

	public Date getBirthDate() {
		return birthDate;
	}

	public void setBirthDate(Date birthDate) {
		this.birthDate = birthDate;
	}

	@Override
	public String toString() {
		return "[Registration: " + this.id + "]";
	}

}
